package 特质

object MixInDemo01 {
  def main(args: Array[String]): Unit = {
    val o = new OracleDB with Operate
    o.insert(100)
  }
}

trait Operate {
  def insert(id: Int): Unit = {
    println("插入的数据id=" + id)
  }
}

class OracleDB {

}

class MySqlDB {

}

